/*
 * @Author: your name
 * @Date: 2021-12-23 12:49:17
 * @LastEditTime: 2021-12-23 14:06:18
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \json-serveg:\桌面2\50htmljs\keycodes\javascript.js
 */
const insert = document.getElementById('insert')

window.addEventListener('keydown',(event)=>{
    insert.innerHTML = `
    <div class="key">
            ${event.key === ' ' ? 'Space' : event.key} 
            <small>event.key</small>
          </div>
          <div class="key">
            ${event.keyCode}
            <small>event.keyCode</small>
          </div>
          <div class="key">
            ${event.code}
            <small>event.code</small>
          </div>
    `
})
